package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;
import org.apache.commons.lang3.StringUtils;

/**
 * 中犇科技
 */
public class ZhongBenKeJiUtil {

    public static String getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return "10000";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return "30000";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return "50000";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loan)) {
            return "100000";
        }
        return "200000";
    }

    public static String getRemark(String shebao,String baodan,String house,String car,String gjj,String zhima,String job,String xueli,String xinyongka) {
        StringBuilder stringBuilder = new StringBuilder();
        if (StringUtils.isNotEmpty(shebao)) {
            stringBuilder.append("社保：").append(BaseTypeInfoEnum.Shebao.getNameByValue(shebao)).append(",");
        }
        if (StringUtils.isNotEmpty(baodan)) {
            stringBuilder.append("保险：").append(BaseTypeInfoEnum.Baoxian.getNameByValue(baodan)).append(",");
        }
        if (StringUtils.isNotEmpty(house)) {
            stringBuilder.append("房子：").append(BaseTypeInfoEnum.House.getNameByValue(house)).append(",");
        }
        if (StringUtils.isNotEmpty(car)) {
            stringBuilder.append("车子：").append(BaseTypeInfoEnum.Car.getNameByValue(car)).append(",");
        }
        if (StringUtils.isNotEmpty(gjj)) {
            stringBuilder.append("公积金：").append(BaseTypeInfoEnum.Gjj.getNameByValue(gjj)).append(",");
        }
        if (StringUtils.isNotEmpty(zhima)) {
            stringBuilder.append("芝麻分：").append(BaseTypeInfoEnum.Zhima.getNameByValue(zhima)).append(",");
        }
        if (StringUtils.isNotEmpty(job)) {
            stringBuilder.append("工作情况：").append(BaseTypeInfoEnum.Gongzuo.getNameByValue(job)).append(",");
        }
        if (StringUtils.isNotEmpty(xueli)) {
            stringBuilder.append("学历情况：").append(BaseTypeInfoEnum.XueLi.getNameByValue(xueli)).append(",");
        }
        if (StringUtils.isNotEmpty(xinyongka)) {
            stringBuilder.append("信用卡：").append(BaseTypeInfoEnum.XinYongKa.getNameByValue(xinyongka)).append(",");
        }
        if (stringBuilder.length() > 0) {
            stringBuilder.deleteCharAt(stringBuilder.length() - 1);
        }

        return stringBuilder.toString();
    }





}
